Lossy compression techniques

ABSTRACT

Techniques are disclosed relating to compression of pixel data using different quantization for different regions of a block of pixels being compressed. In some embodiments, compression circuitry is configured to determine, for multiple components included in pixels of the block of pixels being compressed, respective smallest and greatest component values in respective regions of the block of pixels. The compression circuitry may determine, based on the determined smallest and greatest component values, to use a first number of bits to represent delta values relative to a base value for a first component in a first region and a second, different number of bits to represent delta values relative to a base value for a second component in the first region. The compression circuitry may then quantize delta values for the first and second components of pixels in the first region of the block of pixels using the determined first and second numbers of bits. In some embodiments, the compression circuitry determines whether to provide cross-component bit sharing within a region.

BACKGROUND Technical Field

This disclosure relates to data compression circuitry.

Description of the Related Art

Computing devices may compress various types of data, e.g., to reducememory footprint or bandwidth. Compression may be particularly usefulfor multi-media data such as pixels processed by a graphics processor.Some compression is lossy such that decompressed data may not match theimage before compression. Lossless compression, on the other hand,provides the original data after decompression. Different losslesscompression techniques may have different characteristics, e.g., computeresources such as area or power required for compression, compressionspeed, compression ratios, etc. Similarly, different lossy compressiontechniques may have different characteristics, including accuracy ofdata after decompression (some lossy techniques may cause more loss thanothers). The quality of a compression implementation may havesubstantial effects on performance, power consumption, or circuit area.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a block diagram illustrating example compression circuitry,according to some embodiments.

FIG. 1B is a block diagram illustrating example lossless and lossycompression circuitry, according to some embodiments.

FIG. 2A is a block diagram illustrating an example block of pixels thatincludes four regions, according to some embodiments.

FIG. 2B is a block diagram illustrating example neighbor relationshipsfor a block of pixels for a neighbor predictor, according to someembodiments.

FIG. 3 is a flow diagram illustrating an example method for selecting alossless compression technique, according to some embodiments.

FIG. 4 is a block diagram illustrating example formatting of a losslesscompressed block of pixels, according to some embodiments.

FIG. 5 is a flow diagram illustrating an example method for lossycompression, according to some embodiments.

FIG. 6 is a block diagram illustrating example formatting of a region ofa lossy compressed block of pixels, according to some embodiments.

FIG. 7 is a flow diagram illustrating an example method for losslesscompression, according to some embodiments.

FIG. 8 is a flow diagram illustrating an example method for lossycompression, according to some embodiments.

FIG. 9 is a block diagram illustrating an example computer system,according to some embodiments.

FIG. 10 a block diagram illustrating an example computer-readable mediumthat stores circuit design information, according to some embodiments.

This specification includes references to various embodiments, toindicate that the present disclosure is not intended to refer to oneparticular implementation, but rather a range of embodiments that fallwithin the spirit of the present disclosure, including the appendedclaims. Particular features, structures, or characteristics may becombined in any suitable manner consistent with this disclosure.

Within this disclosure, different entities (which may variously bereferred to as “units,” “circuits,” other components, etc.) may bedescribed or claimed as “configured” to perform one or more tasks oroperations. This formulation—[entity] configured to [perform one or moretasks]—is used herein to refer to structure (i.e., something physical,such as an electronic circuit). More specifically, this formulation isused to indicate that this structure is arranged to perform the one ormore tasks during operation. A structure can be said to be “configuredto” perform some task even if the structure is not currently beingoperated. A “compression circuit configured to compress a block of pixeldata” is intended to cover, for example, a circuit that performs thisfunction during operation, even if the circuit in question is notcurrently being used (e.g., power is not connected to it). Thus, anentity described or recited as “configured to” perform some task refersto something physical, such as a device, circuit, memory storing programinstructions executable to implement the task, etc. This phrase is notused herein to refer to something intangible.

The term “configured to” is not intended to mean “configurable to.” Anunprogrammed FPGA, for example, would not be considered to be“configured to” perform some specific function, although it may be“configurable to” perform that function. After appropriate programming,the FPGA may then be configured to perform that function.

Reciting in the appended claims that a structure is “configured to”perform one or more tasks is expressly intended not to invoke 35 U.S.C.§ 112(f) for that claim element. Accordingly, none of the claims in thisapplication as filed are intended to be interpreted as havingmeans-plus-function elements. Should Applicant wish to invoke Section112(f) during prosecution, it will recite claim elements using the“means for” [performing a function] construct.

As used herein, the term “based on” is used to describe one or morefactors that affect a determination. This term does not foreclose thepossibility that additional factors may affect the determination. Thatis, a determination may be solely based on specified factors or based onthe specified factors as well as other, unspecified factors. Considerthe phrase “determine A based on B.” This phrase specifies that B is afactor that is used to determine A or that affects the determination ofA. This phrase does not foreclose that the determination of A may alsobe based on some other factor, such as C. This phrase is also intendedto cover an embodiment in which A is determined based solely on B. Asused herein, the phrase “based on” is synonymous with the phrase “basedat least in part on.”

Further, as used herein, the terms “first,” “second,” “third,” etc. donot necessarily imply an ordering (e.g., temporal) between elements. Forexample, a referring to a “first” graphics operation and a “second”graphics operation does not imply an ordering of the graphics operation,absent additional language constraining the temporal relationshipbetween these operations. In short, references such as “first,”“second,” etc. are used as labels for ease of reference in thedescription and the appended claims.

DETAILED DESCRIPTION

This disclosure discusses embodiments of techniques for both losslessand lossy compression. In some embodiments, a processor operates in amode in which lossy compression is used for a given block of pixels onlyif it is determined that lossless compression cannot meet a targetoutput data size. In various disclosed embodiments, compression operateson blocks of pixel data, but these examples are not intended to limitthe scope of the present disclosure. Rather, the disclosed techniquesmay be implemented to compress various types of input data.

FIG. 1A is a block diagram illustrating example compression circuitry110. As discussed above, the input data may include values for a blockof pixels to be compressed (and each pixel may include values formultiple components or channels). The compressed data may include datarepresenting pixels after compression, header information that indicatesthe type of compression used, and metadata that describes the size ofthe compressed block, for example.

FIG. 1B is a block diagram illustrating example lossless compressioncircuitry 120 and lossy compression circuitry 130, according to someembodiments. In some embodiments, lossy compression circuitry 130 is notconfigured to compress the input data unless lossless compressioncircuitry 120 determines it cannot achieve a target compressed size. Insome embodiments, lossless and lossy compression may proceed at leastpartially in parallel. Although disclosed embodiments support bothlossless and lossy compression, the disclosed techniques may also beused independently. For example, a processor may support the disclosedlossy compression techniques but not the disclosed lossless compressiontechniques, or vice versa. In some embodiments, however, disclosedtechniques leverage the fact that the compression circuitry considersboth lossless and lossy compression for a given block of pixels.

FIG. 2A is a block diagram illustrating an example block of pixels,according to some embodiments. Each pixel may have multiplecorresponding data fields, e.g., components that may be used for R, G,B, A channels, or other uses. Thus, compression of the block of pixelsmay operate on multiple components for each valid pixel. In theillustrated embodiment, the block includes M×N pixels where M and N areintegers that may be the same or different. For example, the block maybe 4×4, 4×8, 8×4, 8×8, 8×16, etc. In the illustrated example, the blockis divided into four regions by the heavier lines of FIG. 2A. A blockmay be sub-divided into various appropriate numbers of regions that eachinclude multiple pixels, in some embodiments.

In some embodiments, the device determines different losslesscompression predictors in order to select a lossless compressiontechnique, e.g., that results in the greatest compression ratio amongavailable techniques. Different predictors may use different basepixels, e.g., to encode pixels based on their delta values relative tothe base. For example, disclosed techniques may utilize origin,gradient, and neighbor predictors. In some embodiments, the base andgradient predictors use pixel (0,0) as a base pixel while the neighborpredictor uses a different neighbor base (NB) pixel. In the illustratedexample, the NB pixel is located near the center of the block. In otherembodiments, one or more predictors may dynamically determine their baselocation for a given block of pixels, although this may increasecomplexity and power consumption.

In some embodiments, an origin predictor represents each pixel componentas a delta value relative to the same component of a base pixel (e.g.,pixel (0,0)). In some embodiments, an origin-with-decorrelationpredictor may operate similarly to the origin predictor but may firstsubtract out values of one component (e.g., the green component) fromthe other corresponding components which may reduce correlation amongcomponents and may positively affect compression ratios. In someembodiments, a gradient predictor represents each pixel component as adelta value relative to the same component of a base pixel plus agradient value. In some embodiments, a neighbor predictor representseach pixel component as a delta value relative to the same component ofa neighbor pixel. A neighbor-with-decorrelation predictor may be similarto a neighbor predictor, but with one component subtracted.

FIG. 2B shows an example pattern for a neighbor predictor, according tosome embodiments. In FIG. 2B, the arrow from each pixel indicates theneighbor pixel based on which its delta is computed. As shown, thepattern includes a base pixel which is not represented using a delta andwhich may be located at various locations in different embodiments. Theillustrated pattern is included for purposes of explanation, but is notintended to limit the scope of the present disclosure; various patternsfor encoding relationships between pixels may be implemented for variouspredictors.

Example Lossless Compression Using Multiple Predictors

In some embodiments, a computing system computes multiple losslesspredictors for different compression techniques, at least partially inparallel, to determine the performance of multiple different compressiontechniques on an input block of pixel data. For example, consider asituation where an origin predictor has a pixel with a greatest deltafrom the origin value of seven while a neighbor predictor has a pixelwith a greatest delta of three. In an implementation with unsigneddeltas t, the origin predictor needs three bits to represent each pixelin compressed form while the neighbor predictor only needs two bits torepresent each pixel in compressed form. The overall best predictor mayfurther be influenced by additional considerations such as header sizeneeded, whether use of a bias affects delta size, whether pixels indifferent regions of the block can be represented using differentnumbers of bits, etc., as discussed in further detail below. Thus, aftercomputing size needed for multiple predictors in parallel, the systemmay select the compression technique that provides the smallestcompression size (e.g., header metadata plus bits needed to representall the pixels in the block).

FIG. 3 is a flow diagram illustrating an example technique for losslesscompression of a block of pixels, according to some embodiments. Themethod shown in FIG. 3 may be used in conjunction with any of thecomputer circuitry, systems, devices, elements, or components disclosedherein, among others. In various embodiments, some of the methodelements shown may be performed concurrently, in a different order thanshown, or may be omitted. Additional method elements may also beperformed as desired.

At 310, in the illustrated embodiment, a computing system determines adelta for each component of each pixel, using multiple predictors.Example predictors include an origin predictor, anorigin-with-decorrelation predictor, a gradient predictor, a neighborpredictor, and a neighbor-with-decorrelation predictor. For the gradientpredictor, the system may first determine x and y gradients for theorigin pixel (0, 0) for each component, e.g., according to theequations:dcbx=wrap_to_range(pixel(1,0).c−pixel(0,0).c,component_width/2)dcdy=wrap_to_range(pixel(0,1).c−pixel(0,0).c,component_width/2)wherein the component_width indicates to the number of bits used torepresent a component and the “.c” notation refers to the currentcomponent.

The following pseudocode represents example techniques to determine adelta for each predictor for a given pixel at the x, y position in theblock:

delta_origin = pixel(x, y).c − pixel(0, 0).c where pixel (0,0) is thebase pixel for the origin predictor. delta_origin_decorrelate =wrap_to_range(pixel(x, y).c − pixel(x, y).green) −wrap_to_range(pixel(0, 0).c − pixel(0, 0).green) where decorrelation isperformed by subtracting the green component. delta_gradient = pixel(x,y).c − ( pixel(0, 0).c + dcdx*x + dcdy*y ) where pixel (0,0) is the basepixel for the gradient predictor. delta_neighbor = pixel(x, y).c −pixel(nx, ny).c where pixel (nx,ny) is the neighbor pixel for pixel(x,y) according to a neighbor pattern. delta_neighbor_decorrelate =wrap_to_range(pixel(x, y).c − pixel(x, y).green) −wrap_to_range(pixel(nx, ny).c − pixel(nx, ny).green)

At 312, in the illustrated embodiment, the system determines, for theentire block, the greatest number of bits needed to represent a deltafor each pixel component for each predictor. The system may encodedeltas as signed values with a bit width equal to the component width.The following represents an example technique to determine the number ofbits needed for deltas of a given signed component:bits_c=max(signed_num_bits(max_delta_c),signed_num_bits(min_delta_c))where signed_num_bits is a function that determines the number of bitsneeded to contain a 2's compliment encoding of the input, max_delta_c isthe greatest delta value for the component and min_delta_c is thesmallest delta value for the component. In some embodiments, the systemis configured to determine the number of bits needed to pack all thedeltas in the block for each component.

At 314, in the illustrated embodiment, the system also determines, foreach sub-region of the block (e.g., each of the four regions shown inFIG. 2A), a greatest number of bits needed to represent a delta for eachpixel component for each predictor. In some embodiments, the system isconfigured to determine the number of bits needed to pack all the deltasin the each sub-region of the block for each component. In someembodiments, this may allow different regions to use different numbersof bits for deltas, when it will improve the overall compression ratio.

At 316, in the illustrated embodiment, the system determines if a biaswill reduce bits_c (e.g., by one) for the block. In some embodiments,this determination is performed for each component and each predictorbut is not performed separately for each region. The followingpseudo-code represents an example technique to determine whether a biasshould be used and the bias value:

biased_bits_c = num_bits(max_delta_c − min_delta_c) if (bits_c >biased_bits_c) delta_bits_c = biased_bits_c; bias_c = (−1 <<(delta_bits_c − 1)) − min_delta_c else delta_bits_c = bits_c bias_c = 0

At 318, in the illustrated embodiment, the system determines potentialreductions in bit widths to represent deltas if using different numbersof bits for deltas in different regions. For example, the followingpseudocode represents a technique for determining region_bits_c, whichrepresents the number of bits needed to represent a delta for acomponent for a particular region, where N represents the number ofregions:

for region (0 .. N−1) region_bits_c = max(signed_num_bits(region_max_delta_c),signed_num_bits(region_min_delta_c)) reduction_c[region] = delta_bits_c− region_bits_cNote that, in some embodiments, there is a maximum reduction for aregion relative to the delta_bits_c value. In some embodiments, thereduction_c[ ] for each region is encoded in the header for compresseddata, if any region has a non-zero reduction.

At 320, in the illustrated embodiment, the system selects one or morepredictors for use in compressing the block of pixels. In someembodiments, the system determines which predictor gives the bestcompression by calculating the variable size in bits. The followingpseudocode represents a technique for determining the number of bitsneeded for deltas for a given predictor:

for region (0 .. N−1) size_predictor_c +=region_bits_c_predictor[region] * num_pixels_region[region]where num_pixels_region may vary for different regions, e.g., becausethe region with the origin pixel may not need a delta for that pixel.

The system may then, for each predictor, determine the cost of theheader, which may vary based on whether the predictor uses regions orbias. Further, some types of predictors such as gradients may incuradditional header overhead to represent the gradient.size_predictor_c+=predictor_c.region_nonzero( )?NUM_REGIONS*region_code_size_bits_c:0size_predictor_c+=predictor_c.bias∇=0?delta_bits_csize_gradient_c+=component_width[c]Where region_code_size_bits represents the number of bits needed tospecify the size of deltas for a region, region_nonzero is defined astrue if any region reduction code (reduction_c[0 . . . N−1] above) isnon-zero, and predictor_c.bias indicates whether a predictor used bias.

In some embodiments, the system selects the predictor with the smallersize for each component. Thus, compressing the block of pixels may usedifferent compression techniques for different components. In someembodiments, there is a pre-defined ordering of predictor selection ifpredictors have the same output size. In some embodiments of losslesscompression, the disclosed computations may be performed separately fordifferent components. In contrast, as discussed below, lossy compressionmay share bits between components in certain situations.

At 322, in the illustrated embodiment, the system compresses the blockbased on the selection. This may include storing delta values for eachcomponent of each pixel using the determined parameters.

At 324, in the illustrated embodiment, the system generates a layout fora header for the block and packs the header. The header may indicate theselected predictor, the number of bits per delta, region information,bias information, etc. Detailed example embodiments of a header arediscussed below with reference to FIG. 4 .

At 326, in the illustrated embodiment, the system generates metadata forthe block. In some embodiments, the metadata indicates the size of thecompressed block. The metadata may be the same size for both lossy andlossless formats, e.g., one byte. The metadata may indicate whether theblock is uncompressed or compressed. For compressed blocks, the metadatamay indicate whether the block is lossy or lossless. For a losslessblock, if the predictor for each component for the block is the same andno components have bias or de-correlation enabled, the block may bedescribed as constant. The metadata may be set according to a tablelookup in this scenario for different compression container formats. Ifthe block is not constant, then the block may be padded and the metadatamay describe the block size. In some embodiments, when all bits of themetadata are not needed to describe the block size, the metadata mayinclude a portion of the mode bits for a component (e.g., component 0)from the header (which may further reduce the size of the compressedblock). In some embodiments, a value of 4′b111 for metadata[7:4]indicates lossy compression. In some embodiments, this value will neveroccur in the metadata when the size of a lossless compressed block isless than or equal to a target size. This fact may be used by a lossycompression technique, in some embodiments, to avoid explicitly encodingthe size of the compressed block in the metadata. Rather, if themetadata indicates lossy compression, this implies that the compressedblock has a target block size for the lossy compression.

At 328, in the illustrated embodiment, the system packs the block. Thismay include aligning the header and region information as shown in FIG.4 below. The deltas for each region may be packed in twiddle order. Ifpart of the header is included in the metadata for the block, the systemremoves that information from the header and the size of the header isreduced. For uncompressed blocks, the system may arrange the pixels in apre-determined order without a header. In some embodiments, multiplecompressed blocks may be packed together into a macro-block for a writeto memory, for example.

In various embodiments, the disclosed techniques may advantageouslyprovide improved lossless compression ratios and improved compressionspeed, relative to traditional techniques. In particular, enablingdifferent deltas widths for different regions may provide goodcompression in regions where one region has a very large maximum deltawith a reasonable amount of header information to encode the reductionsfor the different regions.

FIG. 4 is a diagram illustrating an example compressed block of pixelswith a header, according to some embodiments. In the illustratedembodiment, the compressed block includes header 410 and region fieldsthat specify pixel data for N regions.

Header 410, in the illustrated embodiment, includes a mode field, abits, field, and a base field. Header 410 may also optionally include aregion field, a bias field, or a gradient field (shown using dashedlines) depending on the compression parameters used to compress theblock. In some embodiments, the system generates a separate header foreach component for the block of pixels. In other embodiments, a singleheader is used for the block and the header includes separate instancesof fields for different components.

The mode field, in some embodiments, describes how the component iscompressed. In some embodiments, this field indicates the selectedpredictor (e.g., neighbor, gradient, or origin), whether differentnumbers of bits per delta in different regions is enabled, whether biasis enabled, and whether decorrelation is used. For some formats that donot support decorrelation, the system may omit a decorrelation bit toreduce the size of the mode field.

The bits field, in some embodiments, indicates the delta bit width forthe block. For example, the system may encode the bits field asdelta_bits_c−1 for each component. The size of the bits field may belog₂(component_width). In some embodiments, a delta bit width of 1represents values from −1 to 0, a width of 2 represents values from −2to 1, a width of 3 represents values from −4 to 3, and so on. Note thatthe bit widths for one or more regions may be reduced from the bit widthindicated by the bits field, as discussed below.

The base field, in some embodiments, indicates the base value used forthe selected predictor. The size of the base field may correspond to thecomponent width. If decorrelation is enabled, this field indicates thedecorrelated base value.

The region field, in some embodiments, describes the reduction for eachregion in the block. Note that this field may be included only if themode field indicates that regions are enabled, in some embodiments. Insome embodiments, this field includes a sub-field for each region thatindicates that field's reduction relative to the bit width for theblock. For example, if the bit width is eight and region R3's reductionis three, then the bit width for deltas in region R3 is five.

The bias field, in some embodiments, indicates the bias value to besubtracted from deltas during compression. Note that this field may beincluded only if the mode field indicates that bias is enabled, in someembodiments. In some embodiments, the size of this field isdelta_bits_c.

The gradient field, in some embodiments, indicates the gradients dcdxand dcdy. The size of this field may be the component_width & ˜1. Notethat this field may be included only if the mode field indicates thatthe gradient predictor was selected, in some embodiments.

As shown, each region includes deltas for the pixels in that region.During decompression, the device may locate the start of each regionbased on header 410. In the illustrated example, region 0 includes thebase pixel, (either pixel 0 or pixel M−1 in the illustrated embodiment),where M is the number of pixels per region. In the illustratedembodiment, the potential base pixel that is not actually used as thebase is always located at the last location in the region, which maysimplify decoding. Thus, in various embodiments, the region thatincludes the base pixel may include one less delta than the otherregions. In the illustrated example, the pixels in the other regions(e.g., region N−1) are stored in order from pixel P0 to pixel M−1.

In some embodiments, decompression circuitry is configured to decompressa compressed block of pixels by un-doing various compression actions.For example, decompression circuitry may first determine the location ofa block of pixels, e.g., based on the metadata for blocks in a largerdata set that includes multiple compressed blocks. The decompressioncircuitry then decodes metadata for the block. If the metadata indicatesa constant block, the device may copy constant data to each pixel if thesub-block includes a constant color. If the metadata indicates anuncompressed blocks, the decompression circuitry may simply unpack pixeldata into an expected format.

The decompression circuitry, in some embodiments, then unpacks theheader to determine the size of the variable fields and the start of thepacked deltas. The device then unpacks the deltas using the bit widthsspecified by the header. For origin and gradient modes, they systemdecompresses each component directly using the header by adding thedeltas to the base value. For neighbor mode, the device may initiallydecode interior components, followed by neighboring components. Thesystem reverses decorrelation, if applied during compression. In someembodiments, this decompression procedure provides the original pixeldata without loss.

Example Lossy Compression Techniques

In some embodiments, the computing system falls back to a lossycompression technique after a lossless technique such as the techniqueof FIG. 3 is determined not to meet a target compressed block size. Thetarget block size may be programmable or may vary based on processingmode. Further, in some embodiments, the computing system may performlossy compression without first determining the output size for losslesscompression.

In some embodiments, the disclosed lossy technique separately considersdifferent regions of a block of pixels being compressed. Further, thesystem may determine whether to share bits across components afterselecting an initial quantization, adjust bit widths used for bases anddeltas, and handle certain error conditions or fallback modes.

FIG. 5 is a flow diagram illustrating an example technique for lossycompression of a block of pixels, according to some embodiments. Themethod shown in FIG. 5 may be used in conjunction with any of thecomputer circuitry, systems, devices, elements, or components disclosedherein, among others. In various embodiments, some of the methodelements shown may be performed concurrently, in a different order thanshown, or may be omitted. Additional method elements may also beperformed as desired.

At 510, in the illustrated embodiment, the computing system determinesthat lossless predictor results are too large. For example, none of thelossless predictors used in the technique of FIG. 3 may compress a blockof pixels to a threshold data size. Note that in other embodiments,lossy compression may be performed without performing losslesspredictors first. In some embodiments, checking whether a losslesscompressor can be used before falling back to lossy compression mayimprove overall compression ratios.

At 512, in the illustrated embodiment, the system adds bias and clampspixel component values. For example, the following system may determinewhether the component is represented in a signed format (e.g., signedinteger or signed normalized) or another format (e.g., float orunsigned). If signed, for each component and each region, the systemapplies bias by flipping the sign bit. The result is then clamped, ifappropriate, to a minimum value for preservation.

At 514, in the illustrated embodiment, the system determines minimum andmaximum values for each pixel component in each region of the block ofpixels being compressed. This is one technique for determining the leastcompressible pixel(s) in each region. In some embodiments, the minimumvalue is used as the base and the maximum value is used to determine therange of the component. The outputs of this processing may be themin_value for each component for each region, the min_position (positionof the pixel with the min value) for each component for each region, andthe max_value for each component for each region.

At 516, in the illustrated embodiment, the system determines a lossyquantization mode. For a given component width, a number of modes may beavailable. The modes may be predetermined and encoded, e.g., in a lookuptable. Each mode may have potentially different values for variousattributes such as: range, base bits, delta bits, level, free level, andwhether the base is protected. The base bits and delta bits may indicatethe number of bits used to encode the base and deltas, respectively.Bases may be quantized more in higher modes while deltas may bequantized more with lower modes. The level may indicate how heavily amode will be quantized (or not). The system may also use the level todetermine whether to apply cross-component bit sharing. The level may besigned, and lower level values may indicate greater quantization,overall. The free level may indicate the number of levels that can begiven to another component without subtracting from the currentcomponent's base or delta bits. A protected base indicates that thecomponent's base bits cannot be decremented when giving levels toanother component.

As one example, the following table includes mode information for twomodes of a 16-bit component width, according to some embodiments(although note that various encodings may be implemented). In thisexample, the other modes not shown (e.g., modes 1 through 14) may havevarious ranges, base bits, delta bits, levels, free levels, andprotected values, e.g., in the ranges between the values for mode 0 andmode 15:

Mode Range Base bits Delta bits Level Free level Protected? 0 2 16 1 5 41 15 65536 8 7 −6 0 0

In some embodiments, to determine the lossy quantization mode, thesystem first determines, for each region, the number of bits needed topack all deltas by finding the maximum deltas for each component anddetermining the number of unsigned bits needed to represent the deltas.This value may then be used to generate a quantization mode for eachcomponent based on these ranges. Said another way, each mode may beassociated with a range and the mode may be selected such that thedifference between the max_value and min_value for a component in aregion falls within that range. Once the mode is selected, compressioncircuitry may determine whether to perform cross-component bit sharingbased on the mode.

In some embodiments, the system further determines whether expanding thedelta range (reducing delta quantization) by quantizing the base valuewill reduce quantization loss. For example, the system may apply a maskto determine a new base value after quantization and determine whetherthis value meets a transition threshold. Therefore, the system maydetermine, in some situations, to further quantize the base min_value toprovide additional bits for use for delta quantization. This may beimplemented by increasing the quantization mode by one, for example. Atthis point, the system has selected a quantization mode for eachcomponent in each region, in some embodiments.

At 518, in the illustrated embodiment, the system determines whether touse cross-component bit sharing. Speaking generally, some components mayneed fewer base/delta bits (e.g., for constant values or small deltaranges) and can give up some of their bits for other components toreduce quantization errors for the other components.

In some embodiments, this includes, for each region, sorting eachcomponent's quantization modes e.g., from smallest to largest. For anexample four-component format, for example, the system may sort themodes such that m0 corresponds to the component with the smallest mode,m3 to the component with the greatest mode, and m1 and m2 to the twoother components in an example four-component format.

The system may then determine the differences between each component'smodes and use the differences to determine which components gain or losequantization levels. The following code shows one non-limiting exampleof such a computation, but various techniques are contemplated:

d3_1 = mode[m3] − mode[m1] d3_2 = mode[m3] − mode[m2] d2_0 = mode[m2] −mode[m0] d3_0 = mode[m3] − mode[m0] d2_1 = mode[m2] − mode[m1] if (d3_1<= 1 && mode[m0] <= 1) end_level[m0] = 0 end_level[m1] +=(start_level[m0] + 0)/3 end_level[m2] += (start_level/m0] + 1)/3end_level[m3] += (start_level[m0] + 2)/3 else if (d3_2 <= 1 && mode[m0]<= 1) end_level[m0] = 0 end_level[m1] = start_level[m1] > 0 ? 0 :start_level[m1] end_level[m2] += (start_level[m0] + (start_level[m1] −end_level[m1]) + 0)/2 end_level[m3] += (start_level[m0] +(start_level[m1] − end_level[m1]) + 1)/2 //... else if (d3_0 > 0 &&start_level[m0] > 0) end_level[m0] = 0 end_level[m3] += start_level[m0]if (d2_1 > 0 && start_level[m1] > 0) end_level[m1] = 0 end_level[m2] +=start_level[m1]

Note this code example is for four-channel bit sharing, but similartechniques may be used with different numbers of channels, e.g., intwo-channel modes. At this point, the system has distributedquantization levels across each component and start_level and end_levelindicate how each component will be quantized. Note that although thediscussion above regarding modes and sharing bits based on modes isincluded for purposes of explanation, the present disclosure is notlimited to these specific techniques. Rather, disclosed systems mayimplement various techniques to determine whether to share bits amongcomponents within a given region.

At 520, in the illustrated embodiment, the system adjusts the base anddelta bits. In some embodiments, this uses the quantization levelsdetermined in element 518. For example, the following pseudocode mayimplement this functionality.

base_bits[num_components] = {0} dquad_delta_bits[num_components] = {0}for c in (0..num_components) // Initialize the base and delta bit widthsbase_bits[c] = dq_consts_table[fmt][mode[c]].base_bitsdquad_delta_bits[c] = dq_consts_table[fmt][mode[c]].delta_bits // Applycross-component bit sharing results to base and delta bit widths change= end_level[c] − start_level[c] if (change < 0 && -change >dq_consts_table[fmt][mode[c]].free_level) { dquad_delta_bits[c]−−if(!dq_consts_table[fmt][mode[c]].protected_base) { base_bits[c]−− } }else if (change > 0) { dquad_delta_bits[c] += change base_bits[c] +=change } // Clamp the base and delta bit widths to the component width.// Clamp delta bits to 0 if mode indicates component is constantbase_bits[c] = min(base_bits[c], comp_width[c]) dquad_delta_bits[c] =min(dquad_delta_bits[c], ((dq_consts_table[fmt][mode[c]].delta_bits !=0) ? comp_width[c] : 0))At this point, the system has generated final base bits and delta bitsfor each component, in some embodiments.

At 522, in the illustrated embodiment, the system checks ifpixel-quantization fallback is needed. In certain situations, it may bepreferred to quantize input pixel data within a region directly ratherthan quantizing the base and deltas. One example situation is when thelevel of quantization used for deltas creates quantization errors thatexceed direct quantization of the input pixel data. Another suchsituation is when the input data is represented in a floating pointformat and a component had at least one value that matched a specialencoding (e.g., negative zero, plus or minus infinity, or canonical nota number (NaN) wherein the exponent is all 1's and the mantissa'smost-significant bit is set. In some embodiments, the system isconfigured to fallback to direct quantization of pixel values for aregion if either of these scenarios is detected for that region. Iffallback occurs, the system may skip to element 526 for that region.

At 524, in the illustrated embodiment, the system calculates andquantizes bases and deltas according to the selected parameters. Thesystem may determine the delta for pixel components in a region bysubtracting their value from the base value for that region. Thus, foreach N-pixel region, N−1 delta values may be generated for eachcomponent, because the base pixel has an implied delta value of zero. Insome embodiments, the system then quantizes the delta values using thedetermined numbers of bits for each region. The quantization may includeadjustment to preserve the max component value and to reduce bias (e.g.,bias due to midpoint reconstruction during decompression).

At 526, in the illustrated embodiment, the system packs the compressedpixel information. The packing may be performed differently depending onwhether pixel-quantization fallback mode was used. FIG. 6 , discussed infurther detail below, provides example packing formats.

At 528, in the illustrated embodiment, the system creates metadata forthe compressed data. In some embodiments, the metadata is the same sizefor all formats, e.g., one byte. In some embodiments, sub-blocks with novalid data have a metadata value of zero. In some embodiments, settingmetadata[7:4] to 4′b1111 indicates a lossy mode, which may imply thatthe size of the compressed block corresponds to a lossy target size(which may avoid explicitly encoding the size of the compressed block inthe metadata). In some embodiments, the remaining bits each indicatewhether quantization fallback was used for a particular region (inexample four-region embodiments). In some embodiments, a number ofcompressed blocks are then packed together, along with their metadata,e.g., for a combined write to memory.

FIG. 6 is a block diagram illustrating an example format for a region ofa block of compressed pixels, according to some embodiments. In theillustrated embodiment, the format includes a fixed header 610, variableheader 620, padding bits 630, and packed deltas 640.

In the fixed header 610 and variable header 620, in the someembodiments, the system interleaves data for the different components(e.g., RGBA). The data, in some embodiments, must fit within ¼^(th) ofthe lossy target size. In some embodiments, padding 630 is added suchthat the header is aligned to the start of the data for the region andthe last delta is aligned with the end of the data for the region. Fixedheader 610, in some embodiments, encodes the mode while the variableheader 620 encodes the base value position, and quantized base value,for each component.

In some embodiments, packed deltas 640 include a delta for each pixel inthe region for each component, except for the base. For example, in theillustrated embodiment packed deltas include data for pixels P0 throughPi where there are i+2 pixels in the region. In the illustratedfour-component embodiment, each pixel field includes four deltas (onefor each component) and may include padding if needed. Note that greateror smaller number of deltas may be included for embodiments withdifferent number of components per pixel. When fallback mode is used fora region, in some embodiments, all components are quantized equally andthere is no header encoding.

Decompression circuitry, in some embodiments, is configured to performthe following procedure for lossy decompression. First, the device maydetermine the location of a compressed block, e.g., based on metadatavalues of previous blocks. Second, the decompression circuitry maydecode the metadata for the block. If the metadata indicates a constantblock, the decompression circuitry may copy the color to each pixel. Ifthe metadata indicates a lossless block that fits within the targetsize, lossless decompression circuitry decodes the block, as describedabove with reference to lossless techniques. If the metadata indicates alossy block that required quantization, lossy decompression circuitrydecodes the block.

The decompression circuitry, for each region in the packed block,determines the region encoding. If fallback encoding was used, itunpacks the region and performs midpoint reconstruction to de-quantizeeach pixel. Decompression of this region may be finished, at this point.If fallback encoding was not used, the decompression circuitry unpacksand decodes based on the extracted mode. In some embodiments, thisincludes determining base and delta bit widths based on the mode andadjusting according to cross-component bit sharing (the decompressioncircuitry may perform the same calculation as the compression circuitryto determine cross-component bit sharing based on modes for eachcomponent). The decompression circuitry may then determine unpack thebase and base position and unpack quantized deltas. The decompressioncircuitry may then de-quantize the deltas and reconstruct pixel values.For lossy compression, the output pixel component values may not matchthe input pixel component values due to quantization.

Disclosed techniques may advantageously provide good compression ratios,low power consumption, and improved accuracy for lossy compression,relative to traditional techniques.

Example Methods

FIG. 7 is a flow diagram illustrating an example method for losslesscompression, according to some embodiments. The method shown in FIG. 7may be used in conjunction with any of the computer circuitry, systems,devices, elements, or components disclosed herein, among others. Invarious embodiments, some of the method elements shown may be performedconcurrently, in a different order than shown, or may be omitted.Additional method elements may also be performed as desired.

At 710, in the illustrated embodiment, compression circuitry determines,at least partially in parallel for multiple different losslesscompression techniques, a number of bits needed to represent a leastcompressible pixel, using that technique, in a set of pixels beingcompressed. A “least compressible pixel” in a set of pixels refers to apixel that requires the greatest amount of data to represent in a givencompression technique. For example, for a set of four pixels and anorigin predictor, consider a situation where the pixels have respectivedeltas of one, two, four, and thirty-one. The pixel with the delta ofthirty-one is the least compressible pixel because it requires the mostbits to represent its delta for an origin compression technique. Notethat multiple pixels may be “least compressible pixels” in a set, e.g.,if multiple pixels require the same greatest number of bits. In someembodiments, the elements of FIG. 7 are performed separately fordifferent components of the pixels in the set of pixels.

In some embodiments, the compression circuitry determines, for multipleregions of pixels in the set of pixels for ones of the compressiontechniques, a region number of bits needed to represent a leastcompressible pixel, using that technique. In some embodiments, headerinformation for one or more of the techniques includes fields indicatingdifferences between respective region numbers of bits and the number ofbits. This may provide better compression ratios, e.g., in scenarioswhere one region has a particularly difficult pixel but other regions donot.

In some embodiments, the compression techniques include an origintechnique that determines deltas between values for pixels in the set ofpixels and a value of an origin pixel in the set of pixels, a neighbortechnique that determines deltas between values for adjacent pixels inthe set of pixels, and a gradient technique that determines deltasbetween values for pixels in the set of pixels and a value of an originpixel in the set of pixels added to a gradient value that is based onone or more pixels adjacent to the origin pixel. In some embodiments,the pixel data includes multiple components per pixel and thecompression techniques include one or more decorrelation techniques thatsubtract values from one component (e.g., a green component) from one ormore other components. One of more of the compression techniques mayhave fixed base pixel locations, which may be different for differenttechniques.

At 720, in the illustrated embodiment, the compression circuitry selectsone of the compression techniques based on the determined numbers ofbits for and header sizes needed to store compression information forthe multiple compression techniques. In some embodiments, selection ofthe compression technique may be further based on determined regionnumbers of bits.

At 730, in the illustrated embodiment, the compression circuitry storesinformation that encodes values for the set of pixels using the selectedcompression technique. For example, the compression circuitry may storea delta for each component for each pixel according to the selectedtechnique and generate header information indicating the selectedtechnique and the size of the deltas.

In some embodiments, the compression circuitry generates metadata thatindicates the size of the compressed set of pixels. In some embodiments,the metadata has a fixed size and the compression circuitry, in responseto determining that all bits of the metadata are not needed to representthe size of the compressed set of pixels, includes one or more bits ofheader information in the metadata. This may further reduce the overallsize of the compressed block of pixels.

FIG. 8 is a flow diagram illustrating an example method for lossycompression, according to some embodiments. The method shown in FIG. 7may be used in conjunction with any of the computer circuitry, systems,devices, elements, or components disclosed herein, among others. Invarious embodiments, some of the method elements shown may be performedconcurrently, in a different order than shown, or may be omitted.Additional method elements may also be performed as desired.

At 810, in the illustrated embodiment, compression circuitry accessespixel data for a block of pixels being compressed. The pixel data mayinclude values for multiple components for each pixel. The componentvalues may have different widths for different blocks of pixels and thewidths may be programmable. In some embodiments, the compressioncircuitry determines whether to apply bias to one or more componentvalues represented in a signed format.

At 820, in the illustrated embodiment, the compression circuitrydetermines, for multiple components included in pixels of the block ofpixels, respective smallest and greatest component values in respectivedifferent regions of the block of pixels.

At 830, in the illustrated embodiment, the compression circuitrydetermines, based on the determined smallest and greatest componentvalues, to use a first number of bits to represent delta values relativeto a base value for a first component in a first region and a second,different number of bits to represent delta values relative to a basevalue for a second component in the first region.

In some embodiments, to determine the first and second numbers of bits,the compression circuitry determines a first initial number of bits torepresent delta values in the first region for the first component basedon a difference between corresponding smallest and greatest componentvalues and a second initial number of bits to represent delta values inthe first region for the second component based on a difference betweencorresponding smallest and greatest component values. The compressioncircuitry then selects the first and second numbers of bits in responseto determining to reduce the first initial number of bits to share deltabits with the second component.

In some embodiments, the compression circuitry uses a mode-based look-uptechnique to determine whether to apply cross-component bit sharing. Forexample, the compression circuitry may determine a compression mode forthe first component based on a difference between smallest and greatestcomponent values in the first region for the first component. Thecompression circuitry may then determine whether to share bits based onmodes of the different components. For example, each mode may indicateone or more of the following: an initial number of base bits, an initialnumber of delta bits, a compression level, a free level value thatindicates a number of levels that can be given to another componentwithout subtracting from the component's base or delta bits, and aprotected base value that indicates whether the component's base bitscan be decremented when giving one or more levels to another component.Based on these fields for each component in a region, cross-componentbit sharing logic may determine the extent of bit sharing, e.g., toreduce overall quantization.

At 840, in the illustrated embodiment, the compression circuitryquantizes delta values for the first and second components of pixels inthe first region of the block of pixels using the determined first andsecond numbers of bits. The deltas may be determined relative to a basepixel value. The quantization may result in lossy compression. In someembodiments, the compression circuitry quantizes deltas values for thefirst component of pixels in a second region of the block of pixelsusing a third, different determined number of bits. Said another way,the compression circuitry may quantize delta values for the samecomponent using different numbers of bits in different regions.

In some embodiments, the compression circuitry is configured to selectand apply direct quantization of pixel component values for a secondregion of the block of pixels. The compression circuitry may applydirect quantization (e.g., in contrast to base and delta values) inresponse to determining: that a level of quantization used for deltavalues for the second region creates quantization errors that exceeddirect quantization of the input pixel data or that a floating pointvalue of a component in the second region is included in a set ofspecial floating point values.

At 850, in the illustrated embodiment, the compression circuitry storesa compressed version of the block of pixels using the quantized deltas.For example, the compression circuitry may write the compressed block ofpixels to a level in a cache/memory hierarchy. The block may later beretrieved and decompressed for use in generating graphics frames.

As used herein, the term “each” is used to refer to every element in aset of multiple elements, but there may be other elements associatedwith the apparatus or method that are not being referred to. Saidanother way, where “each” is used with respect to an embodiment toattribute a property or action to every member of a plurality ofelements, it is not intended to foreclose the possibility that theembodiment may include other instances of the element to which theproperty or action does not apply. For example, if an apparatus supportscompression techniques A-F, the phrase “determine, for each technique ina set of multiple compression techniques, . . . ” may refer to eachtechnique in various subsets of all the supported techniques (e.g.,subset A-B, B-E, D and F, etc.). Similarly, when performing an operationfor “each component” of pixels in a block of pixels, this phrase mayrefer to some subset of all potential components, (e.g., when one ormore of the components is not being used to store pixel information).

Example Device

Referring now to FIG. 9 , a block diagram illustrating an exampleembodiment of a device 900 is shown. In some embodiments, elements ofdevice 900 may be included within a system on a chip. In someembodiments, device 900 may be included in a mobile device, which may bebattery-powered. Therefore, power consumption by device 900 may be animportant design consideration. In the illustrated embodiment, device900 includes fabric 910, compute complex 920 input/output (I/O) bridge950, cache/memory controller 945, graphics unit 970, and display unit965. In some embodiments, device 900 may include other components (notshown) in addition to and/or in place of the illustrated components,such as video processor encoders and decoders, image processing orrecognition elements, computer vision elements, etc.

Fabric 910 may include various interconnects, buses, MUX's, controllers,etc., and may be configured to facilitate communication between variouselements of device 900. In some embodiments, portions of fabric 910 maybe configured to implement various different communication protocols. Inother embodiments, fabric 910 may implement a single communicationprotocol and elements coupled to fabric 910 may convert from the singlecommunication protocol to other communication protocols internally.

In the illustrated embodiment, compute complex 920 includes businterface unit (BIU) 925, cache 930, and cores 935 and 940. In variousembodiments, compute complex 920 may include various numbers ofprocessors, processor cores and/or caches. For example, compute complex920 may include 1, 2, or 4 processor cores, or any other suitablenumber. In one embodiment, cache 930 is a set associative L2 cache. Insome embodiments, cores 935 and/or 940 may include internal instructionand/or data caches. In some embodiments, a coherency unit (not shown) infabric 910, cache 930, or elsewhere in device 900 may be configured tomaintain coherency between various caches of device 900. BIU 925 may beconfigured to manage communication between compute complex 920 and otherelements of device 900. Processor cores such as cores 935 and 940 may beconfigured to execute instructions of a particular instruction setarchitecture (ISA) which may include operating system instructions anduser application instructions.

Cache/memory controller 945 may be configured to manage transfer of databetween fabric 910 and one or more caches and/or memories. For example,cache/memory controller 945 may be coupled to an L3 cache, which may inturn be coupled to a system memory. In other embodiments, cache/memorycontroller 945 may be directly coupled to a memory. In some embodiments,cache/memory controller 945 may include one or more internal caches.

As used herein, the term “coupled to” may indicate one or moreconnections between elements, and a coupling may include interveningelements. For example, in FIG. 9 , graphics unit 970 may be described as“coupled to” a memory through fabric 910 and cache/memory controller945. In contrast, in the illustrated embodiment of FIG. 9 , graphicsunit 970 is “directly coupled” to fabric 910 because there are nointervening elements.

Graphics unit 970 may include one or more processors and/or one or moregraphics processing units (GPU's). Graphics unit 970 may receivegraphics-oriented instructions, such as OPENGL®, Metal, or DIRECT3D®instructions, for example. Graphics unit 970 may execute specialized GPUinstructions or perform other operations based on the receivedgraphics-oriented instructions. Graphics unit 970 may generally beconfigured to process large blocks of data in parallel and may buildimages in a frame buffer for output to a display. Graphics unit 970 mayinclude transform, lighting, triangle, and/or rendering engines in oneor more graphics processing pipelines. Graphics unit 970 may outputpixel information for display images. Programmable shader 975, invarious embodiments, may include highly parallel execution coresconfigured to execute graphics programs, which may include pixel tasks,vertex tasks, and compute tasks (which may or may not begraphics-related).

In some embodiments, programmable shader 975 includes disclosedcompression circuitry.

Display unit 965 may be configured to read data from a frame buffer andprovide a stream of pixel values for display. Display unit 965 may beconfigured as a display pipeline in some embodiments. Additionally,display unit 965 may be configured to blend multiple frames to producean output frame. Further, display unit 965 may include one or moreinterfaces (e.g., MIPI® or embedded display port (eDP)) for coupling toa user display (e.g., a touchscreen or an external display).

I/O bridge 950 may include various elements configured to implement:universal serial bus (USB) communications, security, audio, and/orlow-power always-on functionality, for example. I/O bridge 950 may alsoinclude interfaces such as pulse-width modulation (PWM), general-purposeinput/output (GPIO), serial peripheral interface (SPI), and/orinter-integrated circuit (I2C), for example. Various types ofperipherals and devices may be coupled to device 900 via I/O bridge 950.

Example Computer-Readable Medium

The present disclosure has described various example circuits in detailabove. It is intended that the present disclosure cover not onlyembodiments that include such circuitry, but also a computer-readablestorage medium that includes design information that specifies suchcircuitry. Accordingly, the present disclosure is intended to supportclaims that cover not only an apparatus that includes the disclosedcircuitry, but also a storage medium that specifies the circuitry in aformat that is recognized by a fabrication system configured to producehardware (e.g., an integrated circuit) that includes the disclosedcircuitry. Claims to such a storage medium are intended to cover, forexample, an entity that produces a circuit design, but does not itselffabricate the design.

FIG. 8 is a block diagram illustrating an example non-transitorycomputer-readable storage medium that stores circuit design information,according to some embodiments. In the illustrated embodimentsemiconductor fabrication system 820 is configured to process the designinformation 815 stored on non-transitory computer-readable medium 810and fabricate integrated circuit 830 based on the design information815.

Non-transitory computer-readable storage medium 810, may comprise any ofvarious appropriate types of memory devices or storage devices.Non-transitory computer-readable storage medium 810 may be aninstallation medium, e.g., a CD-ROM, floppy disks, or tape device; acomputer system memory or random access memory such as DRAM, DDR RAM,SRAM, EDO RAM, Rambus RAM, etc.; a non-volatile memory such as a Flash,magnetic media, e.g., a hard drive, or optical storage; registers, orother similar types of memory elements, etc. Non-transitorycomputer-readable storage medium 810 may include other types ofnon-transitory memory as well or combinations thereof. Non-transitorycomputer-readable storage medium 810 may include two or more memorymediums which may reside in different locations, e.g., in differentcomputer systems that are connected over a network.

Design information 815 may be specified using any of various appropriatecomputer languages, including hardware description languages such as,without limitation: VHDL, Verilog, SystemC, SystemVerilog, RHDL, M,MyHDL, etc. Design information 815 may be usable by semiconductorfabrication system 820 to fabricate at least a portion of integratedcircuit 830. The format of design information 815 may be recognized byat least one semiconductor fabrication system 820. In some embodiments,design information 815 may also include one or more cell libraries whichspecify the synthesis and/or layout of integrated circuit 830. In someembodiments, the design information is specified in whole or in part inthe form of a netlist that specifies cell library elements and theirconnectivity. Design information 815, taken alone, may or may notinclude sufficient information for fabrication of a correspondingintegrated circuit. For example, design information 815 may specify thecircuit elements to be fabricated but not their physical layout. In thiscase, design information 815 may need to be combined with layoutinformation to actually fabricate the specified circuitry.

Integrated circuit 830 may, in various embodiments, include one or morecustom macrocells, such as memories, analog or mixed-signal circuits,and the like. In such cases, design information 815 may includeinformation related to included macrocells. Such information mayinclude, without limitation, schematics capture database, mask designdata, behavioral models, and device or transistor level netlists. Asused herein, mask design data may be formatted according to graphic datasystem (GDSII), or any other suitable format.

Semiconductor fabrication system 820 may include any of variousappropriate elements configured to fabricate integrated circuits. Thismay include, for example, elements for depositing semiconductormaterials (e.g., on a wafer, which may include masking), removingmaterials, altering the shape of deposited materials, modifyingmaterials (e.g., by doping materials or modifying dielectric constantsusing ultraviolet processing), etc. Semiconductor fabrication system 820may also be configured to perform various testing of fabricated circuitsfor correct operation.

In various embodiments, integrated circuit 830 is configured to operateaccording to a circuit design specified by design information 815, whichmay include performing any of the functionality described herein. Forexample, integrated circuit 830 may include any of various elementsshown in FIGS. 1A-1B. Further, integrated circuit 830 may be configuredto perform various functions described herein in conjunction with othercomponents. Further, the functionality described herein may be performedby multiple connected integrated circuits.

As used herein, a phrase of the form “design information that specifiesa design of a circuit configured to . . . ” does not imply that thecircuit in question must be fabricated in order for the element to bemet. Rather, this phrase indicates that the design information describesa circuit that, upon being fabricated, will be configured to perform theindicated actions or will include the specified components.

Although specific embodiments have been described above, theseembodiments are not intended to limit the scope of the presentdisclosure, even where only a single embodiment is described withrespect to a particular feature. Examples of features provided in thedisclosure are intended to be illustrative rather than restrictiveunless stated otherwise. The above description is intended to cover suchalternatives, modifications, and equivalents as would be apparent to aperson skilled in the art having the benefit of this disclosure.

The scope of the present disclosure includes any feature or combinationof features disclosed herein (either explicitly or implicitly), or anygeneralization thereof, whether or not it mitigates any or all of theproblems addressed herein. Accordingly, new claims may be formulatedduring prosecution of this application (or an application claimingpriority thereto) to any such combination of features. In particular,with reference to the appended claims, features from dependent claimsmay be combined with those of the independent claims and features fromrespective independent claims may be combined in any appropriate mannerand not merely in the specific combinations enumerated in the appendedclaims.

What is claimed is:
 1. An apparatus, comprising: compression circuitryconfigured to: access pixel data for a block of pixels being compressed;determine, for multiple different component data values included inpixel data for a given pixel of the block of pixels, respective smallestand greatest component values in respective different multi-pixelregions of the block of pixels; determine, based on the determinedsmallest and greatest component values, to use a first number of bits torepresent delta values relative to a base value for a first component ina first region and a second, different number of bits to represent deltavalues relative to a base value for a second component in the firstregion; quantize delta values for the first and second components ofpixels in the first region of the block of pixels using the determinedfirst and second numbers of bits; store a compressed version of theblock of pixels using the quantized deltas; and select and apply directquantization of pixel component values for a second region of the blockof pixels, in response to determining that a level of quantization to beused for delta values for the second region creates quantization errorsthat exceed direct quantization of the pixel data.
 2. The apparatus ofclaim 1, wherein, to determine to use the first and second numbers ofbits, the compression circuitry is configured to: determine a firstinitial number of bits to represent delta values in the first region forthe first component; determine a second initial number of bits torepresent delta values in the first region for the second component; andselect the first and second numbers of bits in response to determiningto reduce the first initial number of bits to share delta bits with thesecond component.
 3. The apparatus of claim 2, wherein the compressioncircuitry is configured to: determine a compression mode for the firstcomponent based on a difference between smallest and greatest componentvalues in the first region for the first component; and determine toreduce the first initial number of bits to share delta bits with thesecond component based on the determined compression mode, wherein thecompression mode indicates an initial number of base bits, an initialnumber of delta bits, a free level value that indicates a number oflevels that can be given to another component without subtracting fromthe component's base or delta bits, and a protected base value thatindicates whether the component's base bits can be decremented whengiving one or more levels to another component.
 4. The apparatus ofclaim 1, wherein the compression circuitry is further configured toquantize deltas values for the first component of pixels in a secondregion of the block of pixels using a third, different determined numberof bits.
 5. The apparatus of claim 1, wherein the compression circuitryis configured to generate metadata for the compressed block of pixelsthat indicates: that the block of pixels was compressed using lossycompression, wherein the apparatus is configured to imply that thecompressed block of pixels has a size that matches a target compressionoutput size based on the use of lossy compression; and whether directquantization of pixel component values was used for the respective onesof the regions.
 6. The apparatus of claim 1, wherein the compressioncircuitry is further configured to, prior to determining the respectivesmallest and greatest values, apply a bias to one or more componentvalues represented in a signed format.
 7. The apparatus of claim 1,wherein the compression circuitry is further configured to determine toprovide additional bits for representing quantized delta values,including to: quantize the base value; or increase quantization of thebase value.
 8. The apparatus of claim 7, wherein the compressioncircuitry is configured to apply direct quantization of pixel componentvalues for a third region of the block of pixels in response todetermining that a floating-point value of a component in the secondregion is included in a set of special floating-point values.
 9. Amethod, comprising: accessing, by compression circuitry, pixel data fora block of pixels being compressed; determining, by the compressioncircuitry, for multiple different component data values included inpixel data for a given pixel of the block of pixels, respective smallestand greatest component values in respective different multi-pixelregions of the block of pixels; determining, by the compressioncircuitry based on the determined smallest and greatest componentvalues, to use a first number of bits to represent delta values relativeto a base value for a first component in a first region and a second,different number of bits to represent delta values relative to a basevalue for a second component in the first region; quantizing, by thecompression circuitry, delta values for the first and second componentsof pixels in the first region of the block of pixels using thedetermined first and second numbers of bits; storing, by the compressioncircuitry, a compressed version of the block of pixels using thequantized deltas; and selecting and applying, by the compressioncircuitry, direct quantization of pixel component values for a secondregion of the block of pixels, in response to determining that a levelof quantization to be used for delta values for the second regioncreates quantization errors that exceed direct quantization of the pixeldata.
 10. The method of claim 9, wherein the determining the first andsecond numbers of bits includes: determining, by the compressioncircuitry, a first initial number of bits to represent delta values inthe first region for the first component based on a difference betweencorresponding smallest and greatest component values; determining, bythe compression circuitry, a second initial number of bits to representdelta values in the first region for the second component based on adifference between corresponding smallest and greatest component values;and selecting, by the compression circuitry, the first and secondnumbers of bits in response to determining to reduce the first initialnumber of bits to share delta bits with the second component.
 11. Themethod of claim 10, further comprising: determining a compression modefor the first component based on a difference between smallest andgreatest component values in the first region for the first component;and determining to reduce the first initial number of bits to sharedelta bits with the second component based on the determined compressionmode, wherein the compression mode indicates an initial number of basebits, an initial number of delta bits, a compression level, and a freelevel value that indicates a number of levels that can be given toanother component without subtracting from the component's base or deltabits.
 12. The method of claim 9, further comprising: determining, by thecompression circuitry, provide additional bits for representingquantized delta values by: quantizing the base value; or increasingquantization of the base value.
 13. The method of claim 9, furthercomprising: generating metadata for the compressed block of pixels thatindicates that the block of pixels was compressed using lossycompression, wherein decompression circuitry implies that the compressedblock of pixels has a size that matches a target compression output sizebased on the use of lossy compression.
 14. A non-transitory computerreadable storage medium having stored thereon design information thatspecifies a design of at least a portion of a hardware integratedcircuit in a format recognized by a semiconductor fabrication systemthat is configured to use the design information to produce the circuitaccording to the design, wherein the design information specifies thatthe circuit includes: compression circuitry configured to: access pixeldata for a block of pixels being compressed; determine, for multipledifferent component data values included in pixel data for a given pixelof the block of pixels, respective smallest and greatest componentvalues in respective different multi-pixel regions of the block ofpixels; determine, based on the determined smallest and greatestcomponent values, to use a first number of bits to represent deltavalues relative to a base value for a first component in a first regionand a second, different number of bits to represent delta valuesrelative to a base value for a second component in the first region;quantize delta values for the first and second components of pixels inthe first region of the block of pixels using the determined first andsecond numbers of bits; store a compressed version of the block ofpixels using the quantized deltas; and select and apply directquantization of pixel component values for a second region of the blockof pixels, in response to determining that a level of quantization to beused for delta values for the second region creates quantization errorsthat exceed direct quantization of the pixel data.
 15. Thenon-transitory computer readable storage medium of claim 14, wherein, todetermine to use the first and second numbers of bits, the compressioncircuitry is configured to: determine a first initial number of bits torepresent delta values in the first region for the first component;determine a second initial number of bits to represent delta values inthe first region for the second component; and select the first andsecond numbers of bits in response to determining to reduce the firstinitial number of bits to share delta bits with the second component.16. The non-transitory computer readable storage medium of claim 15,wherein the compression circuitry is configured to: determine acompression mode for the first component based on a difference betweensmallest and greatest component values in the first region for the firstcomponent; and determine to reduce the first initial number of bits toshare delta bits with the second component based on the determinedcompression mode, wherein the compression mode indicates an initialnumber of base bits, an initial number of delta bits, a compressionlevel, and a free level value that indicates a number of levels that canbe given to another component without subtracting from the component'sbase or delta bits.
 17. The non-transitory computer readable storagemedium of claim 14, wherein the compression circuitry is furtherconfigured to quantize deltas values for the first component of pixelsin a second region of the block of pixels using a third, differentdetermined number of bits.
 18. The non-transitory computer readablestorage medium of claim 14, wherein the compression circuitry is furtherconfigured to select and apply direct quantization of pixel componentvalues for a third region of the block of pixels in response todetermining that a floating-point value of a component in the secondregion is included in a set of special floating-point values.
 19. Thenon-transitory computer readable storage medium of claim 14, wherein thecompression circuitry is configured to generate metadata for thecompressed block of pixels that indicates: that the block of pixels wascompressed using lossy compression, wherein the circuit is configured toimply that the compressed block of pixels has a size that matches atarget compression output size based on the use of lossy compression;and whether direct quantization of pixel component values was used forthe respective ones of the regions.
 20. The non-transitory computerreadable storage medium of claim 14, wherein the compression circuitryis further configured to, prior to determining the respective smallestand greatest values, apply a bias to one or more component valuesrepresented in a signed format.